<?php
session_start();
$custname=$_SESSION['cust_name'];
$address=$_SESSION['address'];
$email=$_SESSION['email'];
$passwd=$_SESSION['passwd'];
$dob=$_SESSION['dob'];
$gender=$_SESSION['gender'];
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>user details</title>
</head>

<body>

<?php
		  			$host="localhost";
                    $dbusername="root";
                    $dbpassword="";
                    $database="books";
                    $x=mysql_connect($host,$dbusername,$dbpassword);
                    $x2=mysql_select_db($database);
					
					$query = "INSERT INTO customerinfo VALUES ('' ,'$custname', '$address', '$email','$passwd','$dob','$gender')";
                    $result=mysql_query($query);
					
					$query_login = "INSERT INTO login VALUES ('' ,'$email','$passwd')";
                    $result_login=mysql_query($query_login);
			
					if($result==1)
					{
					echo "User Registered !!";
					}
					else
					{
						echo "Registration Failed !!" ;

					}
									 
		 ?>
</body>
</html>